using Godot;
using System;

public partial class EnemyAttack : Area2D
{
	// Called when the node enters the scene tree for the first time.
	private Enemy _root;
	public override void _Ready()
	{
		BodyShapeEntered += OnCollisonEnemyAttack;
		BodyShapeExited += OnCollisionEnemyEndAttack;
		_root = GetParent<Enemy>();
	}

	private void OnCollisionEnemyEndAttack(Rid bodyRid, Node2D body, long bodyShapeIndex, long localShapeIndex)
	{

	}


	private void OnCollisonEnemyAttack(Rid bodyRid, Node2D body, long bodyShapeIndex, long localShapeIndex)
	{
		GD.Print("我是敌人，我打中了", body.Name, bodyShapeIndex, localShapeIndex);
	}

	// Called every frame. 'delta' is the elapsed time since the previous frame.
	public override void _Process(double delta)
	{
	}
}
